package com.sunyur.tailor.channel.web.outer.receiveorder.dto;

import com.sunyur.tailor.channel.service.inner.receiveorder.param.Items;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * @ClassName CreateReceiveOrderParam
 * @Description 创建收货单请求实体
 * @Author yu.chen
 * @Date 2021/4/29 3:06
 * @Version v1.0
 */
@Data
public class CreateReceiveOrderDTO implements Serializable{

	/**
	 * 采购商收货单号
	 */
	@NotEmpty(message = "采购商收货单号不能为空")
	@Size(max = 45, message = "采购商收货单号长度不能超过45")
	private String purReceiveOrderCode;

	/**
	 * 发货单号
	 */
	@NotEmpty(message = "发货单号不能为空")
	@Size(max = 45, message = "发货单号长度不能超过45")
	private String sendOrderCode;

	/**
	 * 操作人编号
	 */
	@NotEmpty(message = "操作人编号不能为空")
	@Size(max = 45, message = "操作人编号长度不能超过45")
	private String operatorCode;

	/**
	 * 备注
	 */
	@Size(max = 200, message = "备注长度不能超过200")
	private String remark;

	/**
	 * 收货单行信息
	 */
	@Valid
	@NotNull(message = "收货单行信息集合不能为空")
	private List<Items> items;

}
